$(document).bind('copy', function () {
    var text = window.getSelection().toString();
    text += "\r\n";
    text += "\r\n";
    text += "天书榜版权所有。转载请保留原文链接: " + document.location.href;
    copyToClipboard(text);
});

function copyToClipboard(text) {
    var textarea = document.createElement("textarea");
    textarea.textContent = text;
    textarea.style.position = "fixed";
    document.body.appendChild(textarea);
    textarea.select();
    try {
        return document.execCommand("cut");
    } catch (ex) {
        console.warn("Copy to clipboard failed.", ex);
        return false;
    } finally {
        document.body.removeChild(textarea);
    }
}